#include<cstdio>//uncle-lu

int main()
{
	int k;
	scanf("%d",&k);
	while(k)
	{
		printf("%d ",k%10);
		k = k / 10;
	}
	return 0;
}
